<?php

namespace app\common\validate;

use think\Validate;

/**
 * Class CompanyValidate
 * 企业信息验证类
 */
class QaValidate extends BaseValidate{
    /**
     * 验证规则
     */
    protected $rule = [
        'name|问题'                  => 'require|min:2|max:500',
        'anster|回答'                  => 'require|min:1|max:500',
        'parent_questions_id|问题id'                  => 'require|number',
    ];
    /**
     * 提示消息
     */
    protected $message = [

    ];
    /**
     * 验证场景
     */
    protected $scene = [
        'add' => ['name'],
        'answer' => ['anster', 'parent_questions_id']
    ];


}
